package com.xudow.app.dynamicstate_old.module.recommend;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.view.ViewGroup;

import com.activeshare.edu.ucenter.models.base.Courses;
import com.activeshare.edu.ucenter.models.course.CourseWithOtherInfo;
import com.jude.beam.bijection.RequiresPresenter;
import com.jude.beam.expansion.list.BeamListActivity;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.xudow.app.R;
import com.xudow.app.dynamicstate_old.domain.entity.UserCourseWithOtherInfo;
import com.xudow.app.dynamicstate_old.module.user.viewholder.PreferredCourseViewHolder;

@RequiresPresenter(PreferredCoursePresenter.class)
public class PreferredCourseActivity extends BeamListActivity<PreferredCoursePresenter, UserCourseWithOtherInfo> {

    private static final String TAG = "PreferredCourseActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        findViewById(R.id.back).setOnClickListener(v -> finish());
        getListView().setLayoutManager(new LinearLayoutManager(this));
    }

    @Override
    public BaseViewHolder<UserCourseWithOtherInfo> getViewHolder(ViewGroup parent, int viewType) {
        return new PreferredCourseViewHolder(parent);
    }

    @Override
    public int getLayout() {
        return R.layout.activity_recomment_course;
    }
}